<template>
    <view>
        <view class="p-20 bold xl">
            功能列表
        </view>
        <u-cell-group>
            <u-cell-item title="扫码入库" @click="goPages('add')"></u-cell-item>
            <u-cell-item title="扫码查看" @click="goPages('select')"></u-cell-item>
            <u-cell-item title="商品列表" @click="goPages('list')"></u-cell-item>
            <u-cell-item title="借出记录" @click="goPages('lend')"></u-cell-item>
        </u-cell-group>
    </view>
</template>

<script setup>
    const goPages = (params) => {
        let url = ''
        if (params == 'list') {
            url = '/pages/home/list'
        } else if (params == 'lend') {
            url = '/pages/home/lend/lend'
        } else {
            url = `/pages/productInfo/productInfo?type=${params}`
        }
        uni.navigateTo({
            url: url
        })
    }
</script>

<style>

</style>